﻿@namespace MudBlazor.UnitTests.TestComponents
<MudPopoverProvider></MudPopoverProvider>

<MudSelect Label="Select Item"
           MultiSelection="true"
           T="string"
           Delimiter="^"
           SelectAll="true"
           @bind-SelectedValues="@SelectedItems">

    @foreach (var item in AllItems)
    {
        if(item == AllItems.Last())
        {
            <MudSelectItem T="string" Value="@item" Disabled="true">@item</MudSelectItem>
        }
        else
        {
            <MudSelectItem T="string" Value="@item">@item</MudSelectItem>
        }
    }
    </MudSelect>

    @code {
    public static string __description__ = "Test for the Select All option with one disabled SelectItem";
    private List<string> AllItems = new();
    private IEnumerable<string> SelectedItems = new HashSet<string>();
    protected override void OnInitialized()
    {
        AllItems.Add("FirstA");
        AllItems.Add("SecondA");
        AllItems.Add("ThirdA");
        AllItems.Add("FourthA");
    }
}